/**
 * Created by zhangwx on 2015/12/4.
 */

function changeType(){
    if(!MapData) return;
    var ops={
        type:"groupMap",
        data:"data",
        lonb:"lonb",
        latb:"latb",
        displayField:[],
        max:100,//值
        count:"count"
    };

    switch($("input[name='type'][checked]").val()){
        case "userNum":
            ops.data="UserNumAndFlow";
            if(MapData["UserNumAndFlowMax"]){
                ops.max=MapData["UserNumAndFlowMax"].count;
                ops.count="count";
            }else{
                ops.max=100;
                ops.count="count";
            }


            break;
        case "flow":
            ops.data="UserNumAndFlow";
            ops.max=MapData["UserNumAndFlowMax"].flow_totalmax;
            ops.count="flow_total";
            break;
        case "firstTime":
            ops.data="FirstPacket";
            ops.max=MapData["FirstPacketMax"].firstpacket_timemax;
            ops.count="firstpacket_time";
            break;
        default :
            ops.data="UserNumAndFlow";
            ops.max=MapData["UserNumAndFlowMax"].count;
            ops.count="count";
            break;
    }
    window.frames['map'].initData(MapData,ops);
}

